package 类与对象.多态.多态数组;

public class Teacher extends Person{
    private double sal;

    public double getSal() {
        return sal;
    }

    public void setSal(double sal) {
        //薪水
        this.sal = sal;
    }

    public Teacher(String name, int age, double sal) {
        super(name, age);
        this.sal = sal;
    }

    public String say() {
        return super.say() + "\tsal=" +sal;
    }

    public void teacher(){
        System.out.println("老师="+ getName()+ "\t正在授课");
    }
}
